package com.toe.user.webapi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.toe.pojo.entity.user.UserBusinessRole;
import com.toe.pojo.vo.user.UserAdminRoleVO;
import com.toe.pojo.vo.user.UserBusinessRoleVO;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserBusinessRoleMapper extends BaseMapper<UserBusinessRole> {
    /**
     * 利用mybatis-plus添加文章分类
     * @param forumCategory
     * int insert(ForumCategory forumCategory);
     * @return
     */

    /***
     * 根据 ID 删除
     * @param id 主键ID
     *  int deleteById(Serializable id);
     * */

    /**
     * 查询所有管理员角色映射
     * @return
     */
    List<UserBusinessRoleVO> selectAllBusinessRole();

    /**
     * 查询指定映射是否存在
     * @param adminId
     * @param roleId
     * @return
     */
    UserBusinessRoleVO selectOneBusinessRole(long adminId,long roleId);

    /**
     * 删除映射
     * @param adminId
     * @param roleId
     */
    void deleteOne(long adminId,long roleId);

    /**
     * 根据roleid删除
     * @param roleId
     */
    void deleteByRoleId(long roleId);


    /**
     * 根据roleid删除
     * @param adminId
     */
    void deleteByAdminId(long adminId);

}
